<template>
	<view class="content">
		<view class="mine-header">
			<view class="mine-content-box">
				<view class="left">
					<view class="avatar">
						<image :src="avatar" mode=""></image>
					</view>
					<view class="username">
						{{username}}
					</view>
				</view>
				<view class="right">
					<u-icon name="arrow-right" color="#fff" size="28"></u-icon>
				</view>
			</view>
		</view>
		<u-cell-group>
			<u-cell-item icon="bag-fill" title="课程订单" @click="toCourseOrder"></u-cell-item>
			<u-cell-item icon="order" title="意见反馈"></u-cell-item>
			<u-cell-item icon="account-fill" title="关于我们"></u-cell-item>
			<u-cell-item icon="setting-fill" title="设置"></u-cell-item>
		</u-cell-group>
		<!-- tabbar -->
		<u-tabbar v-model="currentTab" :list="tabbar"></u-tabbar>
	</view>
</template>

<script>
	import {
		tabbar
	} from '@/common/tabbar.js'
	export default{
		data(){
			return{
				currentTab: 2,
				tabbar: tabbar,
				avatar:'',
				username:''
			}
		},
		onLoad() {
			this.avatar = uni.getStorageSync('avatar');
			this.username = uni.getStorageSync('nickname');
		},
		methods:{
			toCourseOrder(){
				uni.navigateTo({
					url:"../courseOrder/courseOrder"
				})
			}
		}
	}
</script>

<style lang="scss">
	.content{
		
	}
	.mine-header{
		width: 750rpx;
		height: 240rpx;
		background-color: #1FDCA9;
		padding-top: 140rpx;
		.mine-content-box{
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;
			width: 690rpx;
			height: 100rpx;
			margin: 0 auto;
			.left{
				display: flex;
				flex-wrap: wrap;
			}
			.right{
				display: flex;
				align-items: center;
			}
			.avatar{
				width: 100rpx;
				height: 100rpx;
				border-radius: 50rpx;
				overflow: hidden;
				image{
					width: 100%;
					height: 100%;
				}
			}
			.username{
				color: #fff;
				font-size: 34rpx;
				font-weight: bold;
				margin-left: 20rpx;
				line-height: 100rpx;
			}
		}
	}
</style>
